package com.aster.service.manage.dto.do2dto;


import com.aster.service.manage.domain.TbHospitalInfo;
import com.aster.service.manage.dto.DtoHospitalInfo;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

@org.mapstruct.Mapper
public interface HospitalInfoConvert {

    HospitalInfoConvert MAPPER = Mappers.getMapper(HospitalInfoConvert.class);

    public DtoHospitalInfo do2dto(TbHospitalInfo tbHospitalInfo);

    public List<DtoHospitalInfo> dos2dtos(List<TbHospitalInfo> list);

    public TbHospitalInfo dto2do(DtoHospitalInfo dtoHospitalInfo);

    @Mapping(target="name",ignore=true)
    @Mapping(target="synopsis",ignore=true)
    @Mapping(target="address",ignore=true)
    @Mapping(target="longitude",ignore=true)
    @Mapping(target="latitude",ignore=true)
    @Mapping(target="state",ignore=true)
    public TbHospitalInfo updateDeleted(DtoHospitalInfo dtoHospitalInfo);

    @Mapping(target="name",ignore=true)
    @Mapping(target="synopsis",ignore=true)
    @Mapping(target="address",ignore=true)
    @Mapping(target="longitude",ignore=true)
    @Mapping(target="latitude",ignore=true)
    @Mapping(target="deleted",ignore=true)
    public TbHospitalInfo updateState(DtoHospitalInfo dtoHospitalInfo);

    @Mapping(target="state",ignore=true)
    @Mapping(target="deleted",ignore=true)
    public TbHospitalInfo addData(DtoHospitalInfo dtoHospitalInfo);


}
